
#ifndef _SERIAL_DRIVER_H_
#define _SERIAL_DRIVER_H_


typedef enum _speed{
    Speed_4800,
    Speed_9600,
    Speed_19200,
    Speed_38400,
    Speed_57600,
    Speed_115200,
    Speed_MAX
}Speed;


typedef enum  _parity{
    PARITY_NONE,
    PARITY_ODD,
    PARITY_EVEN
}Parity;


int serial_open(char *dev,  int speed, Parity mode);
int serial_close(int fd);

void serial_set_blocking (int fd, int should_block);

int serial_open_2(char *dev,  int speed, Parity mode);

#endif

